#pragma once
#include "UIBase.h"
#include "../ui/FunctionBtn.h"

class MallUI : public UIBase
{
public:
	MallUI();
	~MallUI();
public:
	static cocos2d::Node* createNode();
	virtual bool init();
	CREATE_FUNC(MallUI);

	Node* m_selectedNode;
	vector<Sprite*> m_controlList;

	Sprite* m_closeBtn;
	Sprite* m_leftBtn;
	Sprite* m_rightBtn;
	Sprite* m_buyBtn;
	ui::Text* m_pageText;
	ui::Text* m_descriptionText;
	
	Sprite* m_showItem[10];
	int m_showItemCurSelIndex;
	Sprite* m_qizhenItem[5];
	int m_qizhenCurSelIndex;

	Sprite* m_decoration;
	Sprite* m_supply;
	Sprite* m_strengthen;
	Sprite* m_Friend;
	Sprite* m_limited;
public:
	bool TouchDown(Touch* touch);
	void TouchMove(Touch* touch);
	bool TouchUp(Touch* touch);

	void Open();							//打开
	void Close();							//关闭
	void RefreshData();					//刷新界面数据
	void ReArrangeUI();					//重新整理UI
	void BuyCallBack(int type);			//购买回调
};